-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
meta(changelog): Update changelog for 9.35.0 #16811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Even if `parentSpanIsAlwaysRootSpan=true` is configured. Fixes #16769
[Gitflow] Merge master into develop
This PR adds support for instrumenting and sending spans from [`ElementTiming` API ](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/elementtiming)entries. Just like with web vitals and long tasks/animation frames, we register a `PerformanceObserver` and extract spans from newly emitted ET entries. Important: - We'll by default emit ET spans. Users can opt out by setting `enableElementTiming: false` in `browserTracingIntegration` - We for now only emit an ET span, if there is an active parent span. Happy to adjust this but considering the limitations from below I'm not sure if we actually want all spans after the pageload span. For now, we'll also emit spans on other transactions that pageload (most prominently `navigation` spans as well). We could also go the route of only sending until the first navigation as with standalone CLS/LCP spans. Happy to accept any direction we wanna take this. Some noteworthy findings while working on this: - ET is only emitted for text and image nodes. - For image nodes, we get the `loadTime` which is the relative timestamp to the browser's `timeOrigin`, when the image _finished_ loading. For text nodes, `loadTime` is always `0`, since nothing needs to be loaded. - For all nodes, we get `renderTime` which is the relative timestamp to the browser's `timeOrigin`, when the node finished rendering (i.e. was painted by the browser). - In any case, we do not get start times for rendering or loading. Consequently, the span duration is - `renderTime - loadTime` for image nodes - `0` for text nodes - The span start time is: - `timeOrigin + loadTime` for image nodes - `timeOrigin + renderTime` for text nodes In addition to the raw span and conventional attributes, we also collect a bunch of ET-specific attributes: - `element.type` - tag name of the element (e.g. `img` or `p`) - `element.size` - width x height of the element - `element.render-time` - `entry.renderTime` - `element.load-time` - `entry.loadTime` - `element.url` - url of the loaded image (`undefined` for text nodes) - `element.identifier` - the identifier passed to the `elementtiming=identifier` HTML attribute - `element.paint-type` - the node paint type (`image-paint` or `text-paint`) also some additional sentry-sepcific attributes: - `route` - the route name, either from the active root span (if available) or from the scope's `transactionName` - `sentry.span-start-time-source` - the data point we used as the span start time More than happy to adjust any of this logic or attribute names, based on review feedback :) closes #13675 also ref #7292 --------- Co-authored-by: Abhijeet Prasad <aprasad@sentry.io> Co-authored-by: s1gr1d <sigrid.huemer@posteo.at>
In order to not have all users of the SDK auto-install the `@sentry/cloudflare` dependency, it's added as `peerDependency`. ref #15597
I noticed that locally I sometimes have old tarballs lying around, which are all published for E2E tests. This is unnecessary, and can also make it a bit unreliable which version is used for tests (as we generally have the dependencies as `*` which could be anything). This changes it so we only publish the current version.
) Not sure why we even have this, but this somehow breaks cloudflare-pages E2E tests in some scenarios. It also seems simply unnecessary - or is there a reason we have this? 🤔 Extracted this out from #16783
This PR: - Adds `eventLoopBlockIntegration` which uses `@sentry-internal/node-native-stacktrace` to detect and capture blocked event loops - Adds suite of integration tests to test all the functionality - Bundling - Unlike the existing ANR integration, we can't bundle the worker code into a base64 string because there is a native module and all threads need to load the same native module - The worker is loaded via `new Worker(new URL('./thread-blocked-watchdog.js', import.meta.url))` which will be bundled correctly by latest Vite and Webpack 5 - For other bundlers you can add an extra entry point pointing at `@sentry/node-native/thread-blocked-watchdog` which should output to`thread-blocked-watchdog.js` next to your bundle. ## Usage If you instrument your application via the Node.js `--import` flag, this instrumentation will be automatically applied to all worker threads. `instrument.mjs` ```javascript import * as Sentry from '@sentry/node'; import { eventLoopBlockIntegration } from '@sentry/node-native'; Sentry.init({ dsn: '__YOUR_DSN__', // Capture stack traces when the event loop is blocked for more than 500ms integrations: [eventLoopBlockIntegration({ threshold: 500, // defaults to 1000 ms maxEventsPerHour: 5, // defaults to 1 })], }); ``` `app.mjs` ```javascript import { Worker } from 'worker_threads'; const worker = new Worker(new URL('./worker.mjs', import.meta.url)); // This main thread will be monitored for blocked event loops ``` `worker.mjs` ```javascript // This worker thread will also be monitored for blocked event loops too setTimeout(() => { longWork(); }, 2_000); ``` Start your application: ```bash node --import instrument.mjs app.mjs ``` Blocked events are captured with stack traces for all threads: <img width="892" alt="image" src="https://github.com/user-attachments/assets/4990eff1-46f9-4a1d-83c7-868493a126d5" /> --------- Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
Make changes to the Vercel AI integration as per https://www.notion.so/sentry/Agent-Monitoring-SDK-differences-21c8b10e4b5d80bcab51f72ae1418ea8 AI summary: ### Key Improvements: 1. **Eliminated duplicate attributes** - Tool call and prompt attributes are now renamed instead of duplicated 2. **Added tool input/output support** - New `gen_ai.tool.input` and `gen_ai.tool.output` attributes 3. **Auto-sets tool type** - Automatically adds `gen_ai.tool.type: 'function'` for tool calls 4. **Better OpenTelemetry compliance** - Cleaner attribute mapping following semantic conventions ### Technical Changes: - Uses `renameAttributeKey()` consistently instead of duplicating attributes - Removes old `ai.*` attributes after creating new `gen_ai.*` ones
Nestjs sync task has the same issue as async tasks - they don't care about exceptions because nestjs `@Cron()` decorator automatically wraps it to `try-catch` block and logs an error. That's why we should capture exception in our `@SentryCron()` decorator. Fixes also #16749 - [ ] If you've added code that should be tested, please add tests. - [x] Ensure your code lints and the test suite passes (`yarn lint`) & (`yarn test`). --------- Co-authored-by: cod1k <cod1k@centro.team> Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>
Noticed #16783 in the nuxt-3-min test, that the plugins are not consistently run apparently. In that test, the client integrations plugin was run before the client config plugin, leading to the client not existing yet, and thus not adding the browser tracing integration. This PR changes this to ensure we have a consistent order of these plugins.
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #16792 Co-authored-by: andreiborza <168741329+andreiborza@users.noreply.github.com>
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #16763 Co-authored-by: chargome <20254395+chargome@users.noreply.github.com> Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>
mydea
approved these changes
Jul 4, 2025
ffd67e5
to
1a1c19d
Compare
chargome
approved these changes
Jul 4, 2025
size-limit report 📦
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.